package com.extrace.server.config;

import lombok.Data;
import org.hibernate.sql.OracleJoinFragment;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 23735
 * Date: 2024-04-17
 * Time: 11:17
 */
@Data
public class AjaxResult {
    private Integer code;
    private String msg;
    private Object data;

    public static AjaxResult error(String msg){
        AjaxResult result = new AjaxResult();
        result.code=-1;
        result.msg=msg;
        return result;
    }

    public static AjaxResult success(Object data){
        AjaxResult result = new AjaxResult();
        result.code=1;
        result.msg="成功";
        result.data = data;
        return result;
    }
}
